﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Locadora.BLL;

namespace MvcMembership.Controllers
{
	[HandleError]
	public class HomeController : Controller
	{
        [Authorize(Users = "*")]
		public ActionResult Index()
		{
            ViewData["Title"] = "Home Page";
            ViewData["Message"] = "Bem-Vindo ao LOCADORA!";
            ViewData["Locacoes"] = DvdBLL.GetClouds();
            //if (Request.HttpMethod == "GET")
            //{
            //    ViewData["ErrorMessage"] = "GET " + DateTime.Now.ToString();
            //}
            //else if (Request.HttpMethod == "POST")
            //{
            //    System.Threading.Thread.Sleep(5000);
            //    ViewData["ErrorMessage"] = "POST " + DateTime.Now.ToString();
            //}
            return View();
		}

        [Authorize(Users = "*")]
		public ActionResult About()
		{
			ViewData["Title"] = "Sobre o LOCADORA";

			return View();
		}
	}
}
